1. Field of the Invention
This disclosure relates to coding methods and, in particular, to a Huffman decoder.
2. Description of the Related Art
Huffman coding is a variable length coding (VLC) technique for lossless data compression that, unlike the lossy nature of transform based coders, provides for the exact recovery of the original data from its compressed version. Compression is achieved by assigning longer codewords to less frequent input symbols and shorter codewords to the more frequent input symbols. Given the source symbol probability distribution, a Huffman coder achieves optimality; that is, the average length of Huffman code approaches the theoretical minimum, i.e., the entropy of the source, where the entropy of the source is defined as the minimum number of its needed to encode the entire message with lossless compression.
Due to its simplicity and efficient compression capability, Huffman coding has been widely used in the international standards for Group 3 fax, Group 4 fax, JPEG image compression, and MPEG 1/MPEG2 video compression.
Huffman encoders map the input source data into codewords of variable length, concatenate them all together and then segment them into fixed-length words (e.g., 8 bits or 16 bits). Huffman encoding can be implemented via table look-ups, or bit-serial operations by traversing a Huffman tree. The use of table look-ups usually speeds up the encoding process. A Huffman look-up table is built based on the empirical source symbol probability distribution. Due to the different characteristics of the data statistics, different applications may have different Huffman look-up tables.
Huffman decoding presents a set of unique challenges. Since different source symbols have different codeword lengths, the receiver has no knowledge of the boundaries of the consecutive codewords in a bitstream. The receiver usually has to decode the bitstream sequentially, bit-by-bit, by tracing a Huffman tree until a leaf (i.e., a terminating node) is reached. Tracing a Huffman tree node-by-node is time-consuming. Table look-ups were proposed to speed up the decoding process. Traditional table look-ups allow receivers to decode one symbol at a time. However, it does not provide adequate throughput for very high data rate applications, such as decoding HDTV. See (Obed Duardo, et al. “An HDTV Video Decoder IC for A TV Receivers” IEEE Transactions on Consumer Electronics. Vol. 43, number 3, pages 628-632, August, 1997 and S. F. Chang and D. G. Messerschmitt. “Designing High-Throughput VLC Decoder Part I Concurrent VLSI Architectures.” IEEE Transactions on Circuits and systems for Video Technology. Vol. 2, number 2, pages 187-196, June 1992). Given the proliferation of high data rate applications, the ability to decipher multiple-coded symbols in each clock cycle is desirable for clock speeds typically operated in the range of 15 to 100 Mhz.